package com.hobbo.ibus;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.hobbo.ijkbus.struct.BaseFragment;

/**
 * @author zsc
 * @create 2019/4/12 0012
 * @Describe
 */
public class AFragment extends BaseFragment {

    public static String TAG = AFragment.class.getName();

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        Button button = new Button(inflater.getContext());
        button.setGravity(Gravity.CENTER);
        button.setText(TAG);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                getFunctionManager().invokeFunction(TAG);
            }
        });
        return button;
    }

    @Override
    public void onHiddenChanged(boolean hidden) {
        super.onHiddenChanged(hidden);
        Log.i(TAG, "hidden:" + hidden);
    }
}
